<?php
class mysql{
	
	public static $conn;
	
	private static $host = 'mysql.bandoine.fr'; 
	private static $port = '23456';
	private static $bdd  = 'labolinux';
	private static $user = 'labolinux';
	private static $password = 'DfGvVRwpDqQGVBpf';
	
	public static function get_conn(){
		try{
 			return new PDO('mysql:host='.self::$host.';port='.self::$port.';dbname='.self::$bdd, self::$user, self::$password);
		}
		catch(Exception $e){
        	echo 'Error : '.$e->getMessage().'<br />';
        	echo 'N° : '.$e->getCode();
        	die();
		}		
	}
}

mysql::$conn = mysql::get_conn();
?>